package com.cll.mybatisPlus.controller;


import com.baomidou.mybatisplus.plugins.Page;
import com.cll.mybatisPlus.service.IRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author chenliangliang123
 * @since 2018-01-27
 */
@Controller
@RequestMapping("/role")
public class RoleController {

    private IRoleService roleService;

    @Autowired
    protected RoleController(IRoleService roleService){
        this.roleService=roleService;
    }


    @ResponseBody
    @GetMapping("/list")
    public Object listAll(){
       return roleService.selectPage(new Page<>(1,5));
    }

}

